//
//  SearchRes.m
//  Taste
//
//  Created by 徐昊 on 16/9/14.
//  Copyright © 2016年 徐昊. All rights reserved.
//

#import "SearchRes.h"
#import "SearchNames.h"
@implementation SearchRes

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"names"]) {
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            SearchNames *names = [SearchNames modelWithDic:dic];
            [array addObject:names];
        }
        _names = array;
    }
}

+ (NSDictionary *)objectClassInArray{
    return @{@"names" : [SearchNames class]};
}

@end
